<?php
class Opt_logAction extends CommonAction {
	//过滤查询字段
	function _filter(&$map){
		$keywords = trim($_POST['name']);
                //$where['title'] =  array('like',"%".$keywords."%");
                
	}

        public function writeLog($message,$type){
            $data = array(
                'message' => $message,
                'type' => $type,
                'ip' => get_client_ip(),
                'user_id' => $_SESSION[C('USER_AUTH_KEY')],
                'create_time' => time()
            );
            M('Opt_log')->add($data);

        }
	
	
}
?>